package ar.edu.itba.ia2010.geneticos.motor.api.sintaxistree.bitwise;

import ar.edu.itba.ia2010.geneticos.motor.api.sintaxistree.Expresion;
import ar.edu.itba.ia2010.geneticos.motor.api.sintaxistree.impl.ExpresionPrimitive;

/**
 * Genera {@link Not}s.
 * 
 * @author Juan F. Codagnone
 * @since Mar 28, 2010
 */
public class NotExpresionPrimitive extends AbstractUnaryExpresionPrimitive {

    /** @see ExpresionPrimitive#create(Expresion[]) */
    public final Expresion create(final Expresion... subexpresions) {
        return new Not(subexpresions[0]);
    }
    
    /** @see ExpresionPrimitive#canCreate(char) */
    public final boolean canCreate(final char c) {
        return Not.CHAR == c;
    }
}